package com.cnap.model.strategy;

import com.cnap.model.schedule.OperateTypeEnum;
import com.cnap.model.validator.EnumCheck;
import com.cnap.utils.JsonUtil;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;

/**
 * 操作参数2.0
 *
 * @author xc
 **/
public class OperateParamV2 {
    /**
     * 服务id
     */
    @ApiModelProperty(value = "服务id")
    @NotNull(message = "服务id不能为空")
    private String svcId;
    /**
     * 操作类型
     */
    @ApiModelProperty(value = "操作类型")
    @NotNull(message = "操作类型不能为空")
    @EnumCheck(enumClass = OperateTypeEnum.class, message = "操作类型校验错误")
    private String operationType;

    /**
     * get
     *
     * @return SvcId
     */
    public String getSvcId() {
        return svcId;
    }

    /**
     * set
     *
     * @param svcId svcId
     */
    public void setSvcId(String svcId) {
        this.svcId = svcId;
    }

    /**
     * get
     *
     * @return OperationType
     */
    public String getOperationType() {
        return operationType;
    }

    /**
     * set
     *
     * @param operationType operationType
     */
    public void setOperationType(String operationType) {
        this.operationType = operationType;
    }

    @Override
    public String toString() {
        return JsonUtil.objectToJsonStr(this);
    }
}
